package com.zmm.common.enums;

/**
 * 月账单种类
 * @author 900045
 * @description:
 * @name KindEnum
 * @date By 2021-10-28 15:13:21
 */
public enum KindEnum {
	/**
	 * 类型说明 24: 信用卡还款, 17: 保险投资, 27: 保险收益, 16: 基金股票投资, 0: 消费
	 */

	REPAYMENT(28,"消费贷还款"),

	CREDIT_CARD_CONSUME(29,"信用卡消费"),

	STOCK(30,"股票投入"),
	
	SALE_STOCK(32,"股票卖出"),

	FUND(31,"基金投入"),
	
	SALE_FUND(33,"基金卖出"),
	
	HOUSE_LOAN(26,"房贷"),

	INSURANCE_INVESTMENT(17,"保险投资"),

	INSURANCE_PROFIT(27,"保险收益"),

	/*INVESTMENT(16,"基金股票投资"),*/
	
	CONSUME(0,"花呗消费"),
	
	
	;
	public Integer code;
	public String name;

	KindEnum(Integer code, String name) {
		this.code = code;
		this.name = name;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public static String getKindEnum(Integer code) {
		if (code <= 0) {
			return null;
		}
		for (KindEnum statusEnum : KindEnum.values()) {
			if (statusEnum.code.equals(code)) {
				return statusEnum.name;
			}
		}
		return null;
	}
}
